<template>
  <div>
    <div class="recommend-title">周末游</div>
    <ul>
      <li class="item" border-bottom v-for="item of recommendlist" :key="item.id">
        <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl" />
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'HomeWeekend',
  data () {
    return {
      recommendlist:
        [
          {
            id: '0001',
            imgUrl: 'https://img1.qunarzz.com/sight/p0/1802/e0/e0736ee4db571454a3.img.jpg_256x160_539ffa67.jpg',
            title: '婺源风景区',
            desc: '中国绝美乡村，开始你的文艺之旅'
          },
          {
            id: '0002',
            imgUrl: 'https://img1.qunarzz.com/sight/p0/1802/e0/e0736ee4db571454a3.img.jpg_256x160_539ffa67.jpg',
            title: '婺源风景区',
            desc: '中国绝美乡村，开始你的文艺之旅'
          },
          {
            id: '0003',
            imgUrl: 'https://img1.qunarzz.com/sight/p0/1802/e0/e0736ee4db571454a3.img.jpg_256x160_539ffa67.jpg',
            title: '婺源风景区',
            desc: '中国绝美乡村，开始你的文艺之旅'
          }
        ]
    }
  }
}
</script>
<style lang="stylus" scoped>
@import '~styles/mixins.styl';

.recommend-title {
  margin-top: 0.2rem;
  line-height: 0.8rem;
  background: #eee;
  text-indent: 0.2rem;
}

.item-img-wrapper {
  overflow: hidden;
  height: 0;
  padding-bottom: 62.5%;
  width: 100%;
}

.item-img {
  width: 100%;
}

.item-info {
  flex: 1;
  padding: 0.1rem;
  min-width: 0;
  ellipsis();
}

.item-title {
  line-height: 0.54rem;
  font-size: 0.28rem;
  ellipsis();
}

.item-desc {
  line-height: 0.4rem;
  font-size: 0.28rem;
  color: #aaa;
  ellipsis();
}

</style>
